package com.example.thymeleaf.service.impl;

import com.example.thymeleaf.entity.UserEntity;
import com.example.thymeleaf.mapper.UserEntityMapper;
import com.example.thymeleaf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName UserServiceImpl
 * @Author fuzhixuan
 * @Date 2022/1/29 14:37
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserEntityMapper userEntityMapper;

    @Override
    public void insertOne(UserEntity userEntity) {
        userEntityMapper.insert(userEntity);
    }

    @Override
    public int findUsers(UserEntity userEntity) {
        return userEntityMapper.findCount(userEntity);
    }
}
